/**
 * @Author: cest
 * @Date: 2022-08-03 08:17:27
 * @LastEditTime: 2022-08-03 10:05:09
 * @LastEditors: cest
 * @FilePath: /vue3-todo-list/vue.config.js
 * @Description: 编辑描述内容
 */
const { defineConfig } = require('@vue/cli-service')
// 自动导入
// eslint-disable-next-line import/extensions, import/no-unresolved
const AutoImport = require('unplugin-auto-import/webpack')
// 按需导入
// eslint-disable-next-line import/extensions, import/no-unresolved
const Components = require('unplugin-vue-components/webpack')
// Element Plus
// eslint-disable-next-line import/extensions, import/no-unresolved
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')

module.exports = defineConfig({
  transpileDependencies: true,

  css: {
    // modules: true,
    extract: false,
    sourceMap: true
  },
  configureWebpack: {
    plugins: [
      AutoImport({
        resolvers: [ElementPlusResolver()],
      }),
      Components({
        resolvers: [ElementPlusResolver()],
      }),
    ],
  }
})
